#include "stdafx.h"
#include "CompositeVent.h"
CompositeVent::	CompositeVent()
{
}
CompositeVent::	CompositeVent(const double& VentCoe
							  , const double& SelfSill):
SingleVent(VentCoe), m_SelfSill(SelfSill)
{
	validate();
}
CompositeVent::	CompositeVent(const CompositeVent &rhs):
SingleVent(rhs.VentCoe()), m_SelfSill(rhs.m_SelfSill)
{
	validate();
}
CompositeVent::~CompositeVent()
{
	// do nothing
}
CompositeVent& CompositeVent::operator=(const CompositeVent &rhs)
{
	if ( this != &rhs )
	{
		SingleVent::operator =(rhs);
        m_SelfSill = rhs.m_SelfSill;
	}
	return (*this);
}

void CompositeVent::sill(const double &SelfSill)
{
	m_SelfSill = SelfSill;
}
const double& CompositeVent::sill() const
{
	return m_SelfSill;
}
CompositeVent* CompositeVent::clone() const
{
	return new CompositeVent(*this);
}
double CompositeVent::calc(const double &SillNCU) const
{
	return (
		threshold(SillNCU, m_SelfSill)*VentCoe()
		);		
}